<template>
	<!-- <div class="pdf" v-show="fileType === 'pdf'">
		<p class="arrow">
			<span @click="changePdfPage(0)" class="turn" :class="{grey: currentPage==1}">Preview</span>
			{{currentPage}} / {{pageCount}}
			<span style="cursor: pointer;" @click="changePdfPage(1)" class="turn" :class="{grey: currentPage==pageCount}">Next</span>
		</p>
		<pdf :src="src">
		</pdf>
	</div> -->
	<div class="pdfimg" style="text-align: center;background-color: #FFFFFF;">
		<img style="width: 60%;" src="../pdfs/ppdf.jpg" >
	</div>
</template>
<script>
	import pdf from 'vue-pdf'
	export default {
		components: {
			pdf
		},
		data() {
			return {
				currentPage: 0, // pdf文件页码
				pageCount: 0, // pdf文件总页数
				fileType: 'pdf', // 文件类型　　　　　
				src: '/pdfs/baogao.pdf', // pdf文件地址
			}
		},
		mounted() {
			this.getList()
		},
		methods: {
			getList() {
				// this.src = pdf.createLoadingTask(this.src)
			},
			changePdfPage (val){
				console.log(this.currentPage)
				if (val === 0 && this.currentPage > 1) {
				    this.currentPage--
				    console.log(this.currentPage)
				}
				if (val === 1 && this.currentPage < this.pageCount) {
				    this.currentPage++
				    console.log(this.currentPage)
				}
			}
		}
	}
</script>
